Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Log the difference in taupage.yaml on startup #207

Merged
merged 1 commit into from
May 10, 2016
Merged

Log the difference in taupage.yaml on startup #207

merged 1 commit into from
May 10, 2016

Conversation

a1exsh
Copy link
Contributor

@a1exsh a1exsh commented Apr 12, 2016

For the stateful applications it might be helpful to have the changes
to Taupage configurtion in the EC2 instance user data to be logged
across restarts.

Using diff with zero lines of unified context: we are only interested
in the changed values.

For the stateful applications it might be helpful to have the changes
to Taupage configurtion in the EC2 instance user data to be logged
across restarts.

Using diff with zero lines of unified context: we are only interested
in the changed values.
@hjacobs
Copy link
Contributor

hjacobs commented Apr 12, 2016

Hmm, that does not honor masking sensitive information 😞

@hjacobs
Copy link
Contributor

hjacobs commented Apr 12, 2016

i.e. it would log potentially sensitive information (e.g. think about Plan B Cassandra admin password) to the logging provider => not good

@a1exsh
Copy link
Contributor Author

a1exsh commented Apr 12, 2016

This is sent to cloud-init-output.log. does this get uploaded to log
service also?

A password will be logged only if it was changed, and yes we can try to
sed/grep it.

On Tue, Apr 12, 2016, 17:07 Henning Jacobs [email protected] wrote:

i.e. it would log potentially sensitive information (e.g. think about Plan
B Cassandra admin password) to the logging provider => not good


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#207 (comment)

@hjacobs
Copy link
Contributor

hjacobs commented Apr 12, 2016

@a1exsh can you check syslog (which is pushed to log provider)?

@a1exsh
Copy link
Contributor Author

a1exsh commented Apr 12, 2016

Nothing from that is logged to syslog.

The password will be logged to that could-init-output.log though on first bootup I think.

util.write_file(TMP_TAUPAGE_CONFIG, config_yaml, 0o444)

LOG.debug("Comparing current configuration with the old one...")
subprocess.call(['diff', '-u0', TAUPAGE_CONFIG, TMP_TAUPAGE_CONFIG])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will fail the first time (/meta/taupage.yaml not there yet)? would be annoying to see an error in the logs..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, good point. Will fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, should it not be throwing an error earlier when it tries to read the config with:

            LOG.debug("Loading existing configuration...")
            config_yaml = util.read_file_or_url(TAUPAGE_CONFIG)

?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, we always have a /meta/taupage.yaml containing default values (created during Taupage AMI build).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, then there's nothing to change at this line. :-)

@femueller
Copy link
Contributor

Looks good to me 👍

@femueller femueller merged commit 8c22d25 into zalando-stups:master May 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants